home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
dev
/
m2
/
showerror.lha
/
ShowError.doc
< prev
next >
Wrap
Text File
|
1995-10-08
|
6KB
|
182 lines
Documentation for ShowError V1.0, (c) 1995 by Frank L÷mker
E-Mail: floemker@techfak.uni-bielefeld.de
Copyright:
~~~~~~~~~
The program is Freeware. It is freely distributable and may be changed
and recompiled as long as no profit is taken out of it. Changes must be
documented.
Introduction:
~~~~~~~~~~~~
ShowError shows Turbo Modula-2 errors in most ARexx based Editors. It
reads the output of m2e, parses this and sends this information on
request to the Editor or back to ARexx.
Requirements:
~~~~~~~~~~~~
ShowError needs OS 2.0 and the following two external libraries:
- rexxsyslib.library
- mathieeedoubbas.library (loaded by rexxsyslib.library)
To use the program, you also need Turbo Modula-2 ((c) by Amritpal Mann,
a great compiler system) and an ARexx-editor.
Installation:
~~~~~~~~~~~~
- Rename "Modula:bin/m2e" to "Modula:bin/m2e2"
- Copy the script "m2e.script" to "Modula:bin/m2e" and change it to your
needs. It containes the following:
.key name/a
m2e2 >t:errors "<name>"
type t:errors ; not necessary
- Set the s-bit of the file "Modula:bin/m2e"
i.e.: protect Modula:bin/m2e +s
- Copy ShowError to "Modula:bin"
- If ShowError should send messages directly to the editor:
Copy one of the files "ShowError.configXXX" to "Modula:s/ShowError.config"
and change it to your needs. There are config-files for different
editors included in the archive. The XXX stands for the name of the
Editor. If you use an other editor, copy one of the included
config-files and change it to your needs.
Config-File:
~~~~~~~~~~~
After the start of the program ShowError tries to load
"Modula:s/ShowError.config". This ASCII-file contains the information
for the direct communication with the editor. The keywords must start
in the first column and end with a "=" (after optional spaces).
The keywords:
PORT = name
The name of the port to which ShowError sends the messages.
LINE = string
The first string ShowError sends if an error should be displayed.
This string is first parsed by Exec.RawDoFmt with the line and the
column as parameters (in this order). So this string can contain
one or two "%ld".
COLUMN = string
The second string ShowError sends if an error should be displayed.
This string is first parsed by Exec.RawDoFmt with the column and the
line as parameters (in this order). So this string can contain one or
two "%ld".
TEXT = string
The third string ShowError sends if an error should be displayed.
This string is first parsed by Exec.RawDoFmt with the number of the
current error, the number of all errors (this two in this order)
and the ErrorMessage as parameters. So this string can contain one
"%s" and one or two "%ld" in any order.
MULTILINE = YES|NO Default: NO
YES: After every WIDTH chars (see below) a newline is integrated in
the ErrorMessages.
NO : The ErrorMessages are shortened to WIDTH chars (see below).
WIDTH = n Default: 255
Dependent on MULTILINE (see above) the maximum length of the
ErrorMessages or the maximum length of the lines of the
ErrorMessages.
NOTIFY = string
If this string is given a notification on the file "t:errors" is
installed. Every time this file is changed ShowError sends this
string to the above port, reads the file "t:errors" and displayes
the first error.
In all strings "\n" are replaced by newlines (ASCII 10).
An example (for CED):
PORT = rexx_ced
TEXT = okay1 Error %ld/%ld:\n%s
LINE = Jumpto %ld %ld
COLUMN=
MULTILINE= YES
WIDTH = 72
NOTIFY= cedtofront
Program Start:
~~~~~~~~~~~~~
After the start the program will test if it already runs. If so it sends
the arguments to the running version and quits. If not it executes the
arguments and then waits to be invoked by itself, by ARexx or by a
CTRL-C signal. If the program gets a CTRL-C signal it quits.
The arguments:
Template: PORT/K,QUIT/S,READ/S,FIRST/S,NEXT/S,PREV/S
PORT
This argument overwrites the port from "Modula:s/ShowError.config".
If the editor opens an own port for every text this argument can
perhaps help.
QUIT
Quit every ShowError (the possibly running version and the current).
READ
Read errors from "t:Errors" and display the first error.
FIRST
Display the first error.
NEXT
Display the next error.
PREV
Display the previous error.
The errors can only displayed if a correct config-file
"Modula:s/ShowError.config" exists.
ARexx-Port:
~~~~~~~~~~
ShowError has an ARexx port "SHOWERROR" with the following commands:
PORT <name>
<name> overwrites the port from "Modula:s/ShowError.config". If the
editor opens an own port for every text this argument can perhaps help.
QUIT
Quit ShowError.
READ
Read errors from "t:Errors", display the first error and return the
text of the first error.
FIRST
Display the first error and return the text of the error.
NEXT
Display the next error and return the text of the error.
PREV
Display the previous error and return the text of the error.
LINE
Return the line of the current error.
COLUMN
Return the column of the current error.
The errors can only displayed if a correct config-file
"Modula:s/ShowError.config" exists.
The information (text, line and column) is only returned if there was
an "options results" in the ARexx-script in front of the command.
Error codes:
rc commands error
5 NEXT No more errors
5 PREV No previous error
10 FIRST,NEXT,PREV,LINE,COLUMN No Errorfile loaded
15 READ Unable to load "t:Errors"
20 ---- Unknown command